fix: process join requests from already-consented DMs#76
Merged
Conversation
Join requests arrive on a joiner->creator DM. Processing a request sets that DM's consent to Allowed, but the batch and catchup scans only listed DMs with Unknown consent - so any later join request from the same joiner (e.g. joining a second conversation from the same creator) was silently dropped. The joiner was never added and never received an error, leaving clients stuck on the "verifying" screen indefinitely. Include Allowed DMs in both scans, and skip requests whose sender is already a member so re-scanned requests stay idempotent (previously the consent flip itself acted as the implicit dedup). Verified against production: a device whose second join request had been sitting unprocessed on an Allowed DM was added immediately by the patched scan, while its already-processed first request was skipped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved This bug fix expands DM scanning to include already-consented conversations so repeat join requests aren't silently dropped. The added idempotency check ensures existing members won't be re-added. Changes are well-scoped with clear defensive logic. You can customize Macroscope's approvability policy. Learn more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Join requests travel over a joiner→creator XMTP DM. When the creator processes a request, it sets that DM's consent to Allowed — but both the batch and catchup scans in
process-join-requestsonly listed DMs with Unknown consent:So the first join from a given identity works (new DM, Unknown consent), but any later join request from the same joiner — e.g. joining a second conversation from the same creator — rides the existing, now-Allowed DM and is silently dropped. The joiner is never added and never receives an
InviteJoinError, which on mobile clients shows up as being stuck on the "Verifying" screen forever.(iOS's creator-side
InviteCoordinator.processJoinRequestOutcomesalready scans[.unknown, .allowed]; this brings the CLI in line. The Android app appears to have the same Unknown-only bug — tracked separately.)Fix
ConsentState.Allowedin both the batch and catchup DM scans.Denied DMs remain excluded, so blocked spam stays blocked.
Verification
Reproduced on production with a real device:
agent servecommand for long-running bot sessions #2 from the same creator → request lands on the existing Allowed DM →process-join-requestsreturnsprocessed 0(the bug; device hangs on "Verifying").already a member — skipping, the pending convo-feat: addagent servecommand for long-running bot sessions #2 request logsAdding <inbox> to conversation <id>,processed 1, and the device's membership was confirmed viaconversation members.pnpm test: 487 passed.pnpm build(tsc): clean.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Fix join request processing to handle already-consented DMs
Unknownonly to[Unknown, Allowed]in both the batch DM scan and thecatchUpmethod, so already-consented DMs are also scanned for join requests.Macroscope summarized 91b4a4e.